import request from '@/utils/request'
import { method } from 'bluebird'
import { update } from 'lodash'

export default {

  getHospSetList(current, limit, searchObj) {
    return request({
      url: `http://localhost:8201/admin/hosp/hospitalSet/findPageHospitalSet/${current}/${limit}`,
      method: 'post',
      data: searchObj
    })
  },

  deleteHospSet(id) {
    return request({
      url: `http://localhost:8201/admin/hosp/hospitalSet/${id}`,
      method: 'delete',
    })
  },
  removeBatchHosp(idList) {
    return request({
      url: `http://localhost:8201/admin/hosp/hospitalSet/batchRemove`,
      method: 'delete',
      data: idList
    })
  },
  lockHosp(id, status) {
    return request({
      url: `http://localhost:8201/admin/hosp/hospitalSet/lockHospSet/${id}/${status}`,
      method: 'put'
    })
  },
  addHosp(hospitalSet) {
    return request({
      url: `http://localhost:8201/admin/hosp/hospitalSet/addHospSet`,
      method: 'post',
      data: hospitalSet
    })
  },
  updateHosp(hospitalSet) {
    return request({
      url: `http://localhost:8201/admin/hosp/hospitalSet/updateHosp`,
      method: 'post',
      data: hospitalSet
    })
  },
  getHospSet(id) {
    return request({
      url: `http://localhost:8201/admin/hosp/hospitalSet/getHospital/${id}`,
      method: 'get'
    })
  }


}
